package cn.stylefeng.guns.modular.system.mapper;

import cn.stylefeng.guns.modular.system.entity.AfterSale;
import cn.stylefeng.guns.modular.system.model.params.AfterSaleParam;
import cn.stylefeng.guns.modular.system.model.result.AfterSaleResult;
import cn.stylefeng.guns.modular.system.model.result.resultVO.AfterSaleOrderVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ZhangJun
 * @since 2019-06-25
 */
@Repository
public interface AfterSaleMapper extends BaseMapper<AfterSale> {

    /**
     * 获取列表
     *
     * @author ZhangJun
     * @Date 2019-06-25
     */
    List<AfterSaleResult> customList(@Param("paramCondition") AfterSaleParam paramCondition);

    /**
     * 获取map列表
     *
     * @author ZhangJun
     * @Date 2019-06-25
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") AfterSaleParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author ZhangJun
     * @Date 2019-06-25
     */
    Page<AfterSaleResult> customPageList(@Param("page") Page page, @Param("paramCondition") AfterSaleParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author ZhangJun
     * @Date 2019-06-25
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") AfterSaleParam paramCondition);

    AfterSale getByProcessInstanceId(@Param("processInstanceId")String processInstanceId);

    Page<AfterSaleOrderVO> lists(@Param("page") Page page,@Param("userId") Long userId,@Param("code") Integer code);
}
